TARGET := main
CC=gcc

CFLAGS += -g
LDFALGS += -g

LIBS := -pthread

SRC := $(wildcard *.c)
DEPEND := $(patsubst %.c, %.o, $(SRC))

$(TARGET) : $(DEPEND)
	$(CC) $^ $(CFLAGS) -o $@ $(LIBS)
	
%.o : %.c
	$(CC) -c $< $(LDFALGS) -o $@	

.PHONY:clean
clean:
	$(RM) $(TARGET) $(DEPEND) -r
